for s1 in range(100,1000):
    a1 = s1%100
    b1 = s1//10%10
    c1 = s1%10
    if  a1**3 + b1**3 + c1**3 == s1:
        print(s1)



s2=100
while s2 < 1000:
    a1 = s2 % 100
    b1 = s2 // 10 % 10
    c1 = s2 % 10
    if a1**3 + b1**3 + c1**3 == s2:
        print(s2)
    s2+=1

s2=100
while s2 < 1000:
    a1 = s2 % 100
    b1 = s2 // 10 % 10
    c1 = s2 % 10
    if a1**3 + b1**3 + c1**3 == s2:
        print(s2)
    s2+=1
